package com.zhongbei.service.impl;

import com.zhongbei.mapper.ParticipationMapper;
import com.zhongbei.pojo.Participation;
import com.zhongbei.service.ParticipationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;
@Service
public class ParticipationServiceImpl implements ParticipationService {
    @Autowired
    private ParticipationMapper participationMapper;

    @Override
    public int insertParticipation(Participation participation) {

        return participationMapper.insertParticipation(participation);
    }

    @Override
    public int updateParticipation(Participation participation) {
        return  participationMapper.updateParticipation(participation,participation.getRecordId());
    }

    @Override
    public int deleteParticipationByParticipationId(Integer participationId) {
        return  participationMapper.deleteParticipationByParticipationId(participationId);
    }

    @Override
    public List<Participation> selectParticipationByParticipationId(Integer memberInfoId) {
        return  participationMapper.selectParticipationByParticipationId(memberInfoId);
    }
}
